home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
wfc007.000
/
include
/
cnetwkst.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-08
|
4KB
|
156 lines
#if ! defined( NET_WORKSTATION_CLASS_HEADER )
/*
** Author: Samuel R. Blackburn
** CI$: 76300,326
** Internet: sammy@sed.csc.com
**
** You can use it any way you like.
*/
#define NET_WORKSTATION_CLASS_HEADER
class CWorkstationUser : public CObject
{
DECLARE_SERIAL( CWorkstationUser )
private:
void m_Initialize( void );
public:
CWorkstationUser();
virtual ~CWorkstationUser();
/*
** Patterned after WKSTA_USER_INFO_1
*/
CString UserName;
CString LogonDomain;
CString OtherDomains;
CString LogonServer;
virtual void Copy( WKSTA_USER_INFO_1 *source );
virtual void Empty( void );
virtual void Serialize( CArchive& archive );
};
class CWorkstationInformation : public CObject
{
DECLARE_SERIAL( CWorkstationInformation )
private:
void m_Initialize( void );
public:
CWorkstationInformation();
virtual ~CWorkstationInformation();
/*
** Patterned after WKSTA_INFO_102
*/
DWORD PlatformID;
CString ComputerName;
CString LANGroup;
DWORD MajorVersion;
DWORD MinorVersion;
CString LANRoot;
DWORD NumberOfLoggedOnUsers;
virtual void Copy( WKSTA_INFO_100 *source );
virtual void Copy( WKSTA_INFO_101 *source );
virtual void Copy( WKSTA_INFO_102 *source );
virtual void Empty( void );
virtual void Serialize( CArchive& archive );
};
class CWorkstationTransport : public CObject
{
DECLARE_SERIAL( CWorkstationTransport )
private:
void m_Initialize( void );
public:
CWorkstationTransport();
virtual ~CWorkstationTransport();
/*
** Patterned after WKSTA_USER_INFO_1
*/
DWORD QualityOfService;
DWORD NumberOfVirtualCircuits;
CString Name;
CString Address;
BOOL WANish;
virtual void Copy( WKSTA_TRANSPORT_INFO_0 *source );
virtual void Empty( void );
virtual void Serialize( CArchive& archive );
};
class CNetWorkstation : public CNetwork
{
DECLARE_SERIAL( CNetWorkstation )
private:
void m_Initialize( void );
protected:
/*
** Workstation information variables
*/
WKSTA_INFO_100 *m_InformationBuffer100;
WKSTA_INFO_101 *m_InformationBuffer101;
WKSTA_INFO_102 *m_InformationBuffer102;
/*
** Transport enumeration variables
*/
WKSTA_TRANSPORT_INFO_0 *m_TransportBuffer;
DWORD m_TransportResumeHandle;
DWORD m_TransportCurrentEntryNumber;
DWORD m_TransportNumberOfEntriesRead;
DWORD m_TransportTotalNumberOfEntries;
/*
** User enumeration variables
*/
WKSTA_USER_INFO_1 *m_UserBuffer;
DWORD m_UserResumeHandle;
DWORD m_UserCurrentEntryNumber;
DWORD m_UserNumberOfEntriesRead;
DWORD m_UserTotalNumberOfEntries;
public:
CNetWorkstation();
CNetWorkstation( LPCTSTR machine_name );
virtual ~CNetWorkstation();
virtual void Close( void );
virtual BOOL EnumerateInformation( void );
virtual BOOL EnumerateTransports( void );
virtual BOOL EnumerateUsers( void );
virtual BOOL GetCurrentUser( CWorkstationUser& information );
virtual BOOL GetNext( CWorkstationInformation& information );
virtual BOOL GetNext( CWorkstationTransport& information );
virtual BOOL GetNext( CWorkstationUser& information );
virtual void Serialize( CArchive& archive );
};
#endif // NET_WORKSTATION_CLASS_HEADER